$(document).ready(function(){
    var clientHeight = document.documentElement ? document.documentElement.clientHeight : document.body.clientHeight;
    
    var main = document.getElementById("main");
    main.style.cssText="min-height:" + clientHeight + "px;background-color: rgb(247,247,247);"
    if( window.location.pathname == "/"){
    	if(!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)){
    		var header = document.getElementById("header-pt");
    		var previous = document.createElement( "a" );
    		previous.className="uk-slidenav uk-slidenav-contrast uk-slidenav-previous";
    		previous.setAttribute("data-uk-slideshow-item","previous");

    		var next = document.createElement( "a" );
    		next.className="uk-slidenav uk-slidenav-contrast uk-slidenav-next";
    		next.setAttribute("data-uk-slideshow-item","next");

    		header.appendChild(previous);
    		header.appendChild(next);
    	}
    }else if( window.location.pathname.indexOf("category") >0 ){
    	var category = document.getElementById("category");
    	category.style.cssText="min-height:" + clientHeight +"px";
    }else if (window.location.pathname.indexOf("cart") >0 ) {
        
        var check = document.getElementsByName("check-order");
        for (var i = 0; i < check.length; i++) {
            check[i].addEventListener("click", onClick, false);
        };
        function onClick(event){
            var target = event.currentTarget;
            if( target.getAttribute("isclick") == "1" ){
                event.currentTarget.src="/res/image/widget_check_e.png";
                event.currentTarget.setAttribute("isclick","0");
            }else{
                event.currentTarget.src="/res/image/widget_check_s.png";
                event.currentTarget.setAttribute("isclick","1");
            }
        };
    } else{};
});